#ifndef PASSWDNOTE_H
#define PASSWDNOTE_H

#include <QWidget>
#include <QStandardItemModel>
#include <QStandardItem>
#include "header.h"
#include "jmysql.h"

namespace Ui {
class PasswdNote;
}

class PasswdNote : public QWidget
{
    Q_OBJECT

public:
    explicit PasswdNote(QWidget *parent = 0);
    ~PasswdNote();

public slots:
    void resizeEvent(QResizeEvent *e);

    void contextMenuEvent(QContextMenuEvent *event);

private:
    Ui::PasswdNote *ui;

    // 变量
    QStandardItemModel *Model;
    QVector<PSDNOTE> DataSet;
    QMenu *PsdMenu;
    QAction *AddNewOne;
    QAction *DelSelectRow;

    // 函数
    bool Init();
    bool InitTheme();
    bool InitTableView();
    bool IsNoteExist();
    bool CreateNote();
    bool CreateMenu();

public:
    // 变量

    // 函数
    bool LoadPasswdNote();

private slots:
};

#endif // PASSWDNOTE_H
